<?php

namespace App\Observers;

use App\Models\UserGroup;
use Illuminate\Support\Facades\DB;

class UserGroupObserver
{
    function deleted(UserGroup $group)
    {
        DB::table('groups_has_user')
            ->where('group_id', $group->id)
            ->delete();
    }
}
